package xyz.jangle.design.factory;
/**
 * 工厂方法的使用
 * @author Administrator
 *
 */
public class AppMain13 {

	public static void main(String[] args) {
		Creator creator = new ConcreteCreator();
		Product product = creator.factoryMethod();		//工厂方法封装了具体产品的构造过程
		product.printName();
		
		Creator creator2 = new ConcreteCreator2();
		Product product2 = creator2.factoryMethod();	//工厂方法封装了具体产品的构造过程
		product2.printName();

	}

}
